#ifndef _H_IIC_S_H_
#define _H_IIC_S_H_

typedef enum
{
	iic_s_success = 0,
	iic_s_address_no_Ack,
	iic_s_reg_no_Ack,
	iic_s_wdata_no_Ack,
}h_iic_s_state;

typedef struct
{
	void (*sda_out_init)(void);
	void (*sda_high)(void);
	void (*sda_low)(void);
	void (*sda_in_init)(void);
	signed char (*sda_read)(void);
	void (*scl_out_init)(void);
	void (*scl_high)(void);
	void (*scl_low)(void);
	void (*delay_us)(unsigned int);
}h_iic_s_t;

extern void h_iic_s_init(h_iic_s_t *iic_s_t);
extern h_iic_s_state h_iic_s_write_bytes(h_iic_s_t *iic_s_t, unsigned char address, unsigned char reg, \
									unsigned char *data, unsigned short len);
extern h_iic_s_state h_iic_s_read_bytes(h_iic_s_t *iic_s_t, unsigned char address, unsigned char reg, \
									unsigned char *data, unsigned short len);

#endif
